package com.esd.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.esd.device.entity.Device;
import com.esd.device.entity.vo.DeviceVo;
import com.esd.device.entity.vo.ShowDeviceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface DeviceMapper extends BaseMapper<Device> {
    DeviceVo selectByStationId(@Param("stationId") String stationId);

    List<DeviceVo> selectVosByServerIp(@Param("serverIp") String serverIp) ;

    List<DeviceVo> getByLineAndType(@Param("lineName") String lineName, @Param("deviceType") String deviceType);

    int countChannels(@Param("deviceId") Long deviceId);

    List<ShowDeviceVo> getShowDeviceVoList(@Param("lineId") Long lineId);

    List<HashMap<String , Object>> getAllStationIdAndSignalChannelCount() ;

    Integer getLatestNo();

    int enabledMon(@Param("id") Long id, @Param("value") String value);
}
